import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Templates 2.15 as T

T.Button {
    id: uiBtn
    text: "默认文本"
    background: Image {
        source: "/zuojia/Launcher/Images/BtnNormal.png"
        opacity: uiBtnMouseArea.containsPress ? 0.2 : (uiBtnMouseArea.containsMouse ? 0.3 : 0.0)
        anchors.fill: parent
    }

    contentItem: Label {
        text: uiBtn.text
        color: "#FFFFFF"
        horizontalAlignment: "AlignHCenter"
        verticalAlignment: "AlignVCenter"
    }

    MouseArea {
        id: uiBtnMouseArea
        anchors.fill: parent
        hoverEnabled: true
    }

    BorderImage {
        width: parent.width
        height: parent.height
        border { left: 2; top: 2; right: 2; bottom: 2 }
        horizontalTileMode: BorderImage.Repeat
        verticalTileMode: BorderImage.Repeat
        source: "/zuojia/Launcher/Images/Border.png"
        opacity: 0.5
    }

}
